home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 29
/
Volume 29 - JOGO DISK .iso
/
Games
/
jungle_adventure.swf
/
scripts
/
__Packages
/
MovieClipSkew.as
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
57 lines
class MovieClipSkew extends MovieClip
{
var __xskew = 0;
var __yskew = 0;
function MovieClipSkew()
{
super();
}
static function create(parent, linkageID, newName, depth)
{
var _loc1_ = parent.createEmptyMovieClip(newName,depth);
var _loc2_ = _loc1_.createEmptyMovieClip("skewClip",0);
if(linkageID == null)
{
_loc2_ = _loc2_.createEmptyMovieClip("asset",0);
}
else
{
_loc2_ = _loc2_.attachMovie(linkageID,"asset",0);
}
_loc2_._rotation = -45;
_loc1_.__proto__ = MovieClipSkew.prototype;
_loc1_.asset = _loc2_;
_loc1_.skew(0,0);
return _loc1_;
}
function set _xskew(v)
{
this.skew(v,this.__yskew);
}
function get _xkew()
{
return this.__xskew;
}
function set _yskew(v)
{
this.skew(this.__xskew,v);
}
function get _ykew()
{
return this.__yskew;
}
function skew(x, y)
{
var _loc3_ = x * 0.0174532925199433;
var _loc2_ = y * 0.0174532925199433;
var _loc0_ = null;
var _loc4_ = this.skewClip._rotation = ((this.__xskew = x) + (this.__yskew = y)) / 2 + 45;
this.skewClip._xscale = 100 * (Math.cos(_loc3_) + Math.sin(_loc2_)) / Math.sin(_loc4_ * 0.0174532925199433) * 0.7071;
this.skewClip._yscale = 100 * (Math.sin(_loc3_) + Math.cos(_loc2_)) / Math.sin(_loc4_ * 0.0174532925199433) * 0.7071;
}
function attachMovie()
{
return this.asset.attachMovie.apply(this.asset,arguments);
}
}